﻿var newItemNumber = 1;
var total = 1;
function additem(id) {
    var row, cell, str, hide;
    row = document.getElementById(id).insertRow(total);
    hide = document.getElementById('cphInner_hidden');
    if (row != null) {
        newItemNumber++;
        total++;
        hide.value = newItemNumber;
        cell = row.insertCell(0);
        cell.innerHTML = "<input type=\"file\" size=\"40\" name=\"FileUploadD" + newItemNumber + "\">";
        cell = row.insertCell(1);
        cell.innerHTML = "<input type=\"button\" value=\"删除\" onclick=\'deleteitem(this);\' style=\"width:120px\" >";
        
    }
}

function deleteitem(obj) {
    var curRow = obj.parentNode.parentNode;
    TABLE_D.deleteRow(curRow.rowIndex);
    total--;
}


